//KY266牛客 输出反序数 将整型变量转换为字符数组
#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<string.h>
using namespace std;
int main()
{
    int n=1000;
    for(n;n<9999;n++)
    {
        char arr[4];
        sprintf(arr,"%d",n);
        int temp;
        temp=(arr[0]-'0')*1+(arr[1]-'0')*10+(arr[2]-'0')*100+(arr[3]-'0')*1000;
        if(temp==n*9)
            printf("%d\n",n);
    }
    return 0;
}